{"ast":null,"code":"import _slicedToArray from \"/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport React, { useContext } from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider';\nimport useStyle from './style';\nimport useMessage from '../message/useMessage';\nimport useNotification from '../notification/useNotification';\nimport useModal from '../modal/useModal';\nimport AppContext from './context';\nvar useApp = function useApp() {\n  return React.useContext(AppContext);\n};\nvar App = function App(props) {\n  var customizePrefixCls = props.prefixCls,\n    children = props.children,\n    className = props.className;\n  var _useContext = useContext(ConfigContext),\n    getPrefixCls = _useContext.getPrefixCls;\n  var prefixCls = getPrefixCls('app', customizePrefixCls);\n  var _useStyle = useStyle(prefixCls),\n    _useStyle2 = _slicedToArray(_useStyle, 2),\n    wrapSSR = _useStyle2[0],\n    hashId = _useStyle2[1];\n  var customClassName = classNames(hashId, prefixCls, className);\n  var _useMessage = useMessage(),\n    _useMessage2 = _slicedToArray(_useMessage, 2),\n    messageApi = _useMessage2[0],\n    messageContextHolder = _useMessage2[1];\n  var _useNotification = useNotification(),\n    _useNotification2 = _slicedToArray(_useNotification, 2),\n    notificationApi = _useNotification2[0],\n    notificationContextHolder = _useNotification2[1];\n  var _useModal = useModal(),\n    _useModal2 = _slicedToArray(_useModal, 2),\n    ModalApi = _useModal2[0],\n    ModalContextHolder = _useModal2[1];\n  var memoizedContextValue = React.useMemo(function () {\n    return {\n      message: messageApi,\n      notification: notificationApi,\n      modal: ModalApi\n    };\n  }, [messageApi, notificationApi, ModalApi]);\n  return wrapSSR( /*#__PURE__*/React.createElement(AppContext.Provider, {\n    value: memoizedContextValue\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    className: customClassName\n  }, ModalContextHolder, messageContextHolder, notificationContextHolder, children)));\n};\nif (process.env.NODE_ENV !== 'production') {\n  App.displayName = 'App';\n}\nApp.useApp = useApp;\nexport default App;","map":{"version":3,"names":["React","useContext","classNames","ConfigContext","useStyle","useMessage","useNotification","useModal","AppContext","useApp","App","props","customizePrefixCls","prefixCls","children","className","getPrefixCls","wrapSSR","hashId","customClassName","messageApi","messageContextHolder","notificationApi","notificationContextHolder","ModalApi","ModalContextHolder","memoizedContextValue","useMemo","message","notification","modal","createElement","Provider","value","process","env","NODE_ENV","displayName"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/antd/es/app/index.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport classNames from 'classnames';\nimport { ConfigContext } from '../config-provider';\nimport useStyle from './style';\nimport useMessage from '../message/useMessage';\nimport useNotification from '../notification/useNotification';\nimport useModal from '../modal/useModal';\nimport AppContext from './context';\nconst useApp = () => React.useContext(AppContext);\nconst App = props => {\n  const {\n    prefixCls: customizePrefixCls,\n    children,\n    className\n  } = props;\n  const {\n    getPrefixCls\n  } = useContext(ConfigContext);\n  const prefixCls = getPrefixCls('app', customizePrefixCls);\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const customClassName = classNames(hashId, prefixCls, className);\n  const [messageApi, messageContextHolder] = useMessage();\n  const [notificationApi, notificationContextHolder] = useNotification();\n  const [ModalApi, ModalContextHolder] = useModal();\n  const memoizedContextValue = React.useMemo(() => ({\n    message: messageApi,\n    notification: notificationApi,\n    modal: ModalApi\n  }), [messageApi, notificationApi, ModalApi]);\n  return wrapSSR( /*#__PURE__*/React.createElement(AppContext.Provider, {\n    value: memoizedContextValue\n  }, /*#__PURE__*/React.createElement(\"div\", {\n    className: customClassName\n  }, ModalContextHolder, messageContextHolder, notificationContextHolder, children)));\n};\nif (process.env.NODE_ENV !== 'production') {\n  App.displayName = 'App';\n}\nApp.useApp = useApp;\nexport default App;"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,aAAa,QAAQ,oBAAoB;AAClD,OAAOC,QAAQ,MAAM,SAAS;AAC9B,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,OAAOC,eA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